﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once

#include "GmepCommonData.h"
#include "UniIdentity.h"
#include <map>

namespace gmep
{
    // Disciplines,categories and classes read from MDMCategory.qpd
    // 
    class GMEP_COMMONDATA_EXPORT IGmepPropertyInfo
    {
    public:
        virtual ~IGmepPropertyInfo() {};
        static gcmp::OwnerPtr<gmep::IGmepPropertyInfo>  Create();

        // 加入时的顺序
        virtual int GetOrder() const = 0;
        virtual void SetOrder(const int order) = 0;

        virtual std::wstring GetId() const = 0;
        virtual void SetId(const std::wstring& sid) = 0;

        virtual std::wstring GetMappedId() const = 0;
        virtual void SetMappedId(const std::wstring& sid) = 0;

        virtual std::wstring GetStandardCode() const = 0;
        virtual void SetStandardCode(const std::wstring& sid) = 0;
        // local name
        virtual const std::wstring GetName() const = 0;
        virtual void SetName(const std::wstring& name) = 0;

        virtual const std::wstring GetGroupName() const = 0;
        virtual void SetGroupName(const std::wstring& name) = 0;
        // local description
        virtual const std::wstring GetDesc() const = 0;
        virtual void SetDesc(const std::wstring& desc) = 0;

        virtual short GetStorageType() const = 0;
        virtual void SetStorageType(short i) = 0;

        virtual gcmp::UniIdentity GetParameterType() const = 0;
        virtual void SetParameterType(std::wstring unildentity) = 0;
        
        virtual bool IsEditableInPP() const = 0;
        virtual void SetIsEditableInPP(bool isEditable) = 0;

        virtual bool IsVisibleInPP() const = 0;
        virtual void SetIsVisibleInPP(bool isvisble) = 0;

        virtual bool IsInstanceParam() const = 0;
        virtual void SetIsInstanceParam(bool isInstance) = 0;

        // 是否是基本属性， 若是扩展属性返回 false
        virtual bool IsBasicProperty() const = 0;
        virtual void SetIsBasicProperty(bool isBasic) = 0;

        virtual std::map<int, std::wstring>  GetEnumValueList() const = 0;
        virtual void SetEnumValueList(std::map<int, std::wstring>  intStrMap) = 0;

        virtual std::map<std::wstring, int>  GetEnumValueStandardCodeList() const = 0;
        virtual void SetEnumValueStandardCodeList(std::map<std::wstring, int>  intStrMap) = 0;
    };
}